
DELETE FROM dbo.MatchPlayerTurnPieces
go
DELETE FROM dbo.MatchPlayerTurns
go
delete from MatchPieces
go
delete from MatchPlayers
go
DELETE FROM MatchTurns
GO
delete from GameMatches
GO

SELECT * from MatchPieces WHERE GameMatch_GameMatchId = 13
AND MatchPlayer_MatchPlayerId IS NOT null ORDER BY MatchPlayer_MatchPlayerId

--SELECT COUNT(*) FROM (
SELECT * from MatchPieces WHERE GameMatch_GameMatchId = 13
AND BoardXpos > 0 AND BoardYpos > 0
--) tblk

SELECT COUNT(*) FROM (
SELECT * from MatchPieces WHERE GameMatch_GameMatchId = 13
AND BoardXpos = -1 AND BoardYpos = -1 AND MatchPlayer_MatchPlayerId IS null
) tblk

SELECT *  from MatchPlayers
SELECT *  from GameMatches

SELECT * FROM dbo.MatchPlayerTurns

SELECT * FROM dbo.MatchPlayerTurnPieces

SELECT * FROM MatchTurns


SELECT * FROM MatchPlayerTurns

SELECT * FROM MatchPlayerTurnPieces
